Skip to content

Reverse a Linked List ​

Reverse a Linked List — LeetCode

Reverse a singly linked list and return the new head.

Approach ​

Like swapping, but keeping track of the previous element

Remarks ​

I need to be careful of what I assign and what I return